/**
 * 
 */
package com.gopay.common.domain.cps;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.gopay.common.domain.BaseEntity;

/**
 * 签约、解约日志实体类
 * 
 * @CpsBtContractLog.java
 * @author xiefei
 * @2012-12-28 上午10:13:23 www.gopay.com.cn Inc.All rights reserved.
 */

@Entity
@Table(name = "CPS_BT_CONTRACT_LOG")
public class CpsBtContractLog extends BaseEntity {

    /**
     * 
     */
    private static final long serialVersionUID = -4630357391181969447L;

    /**
     * 日志流水号
     */
    private int logSq;

    /**
     * 网关交易流水号
     */
    private int pgTransDtlSq;

    /**
     * 协议号
     */
    private String contractId;

    /**
     * 协议类型01 - 签约02 - 解约
     */
    private String contractType;

    /**
     * 发起时间
     */
    private Date launchTime;

    /**
     * 创建时间
     */
    private Date createdTs;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    /**
     * 最后修改交易码
     */
    private String lastUpdTrancode;

    @Id
    @SequenceGenerator(name = "CpsBtContractInfoSequence", sequenceName = "CPS_BT_CONTRACT_INFO_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CpsBtContractInfoSequence")
    @Column(name = "LOG_SQ", unique = true, nullable = false)
    public int getLogSq() {
        return logSq;
    }

    public void setLogSq(int logSq) {
        this.logSq = logSq;
    }

    @Column(name = "TRANS_DTL_SQ", nullable = false)
    public int getPgTransDtlSq() {
        return pgTransDtlSq;
    }

    public void setPgTransDtlSq(int pgTransDtlSq) {
        this.pgTransDtlSq = pgTransDtlSq;
    }

    @Column(name = "CONTRACT_ID", nullable = false, length = 18)
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Column(name = "CONTRACT_TYPE", nullable = false, length = 2)
    public String getContractType() {
        return contractType;
    }

    public void setContractType(String contractType) {
        this.contractType = contractType;
    }

    @Column(name = "LAUNCH_TIME", nullable = false)
    public Date getLaunchTime() {
        return launchTime;
    }

    public void setLaunchTime(Date launchTime) {
        this.launchTime = launchTime;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "LAST_UPD_TRANCODE")
    public String getLastUpdTrancode() {
        return lastUpdTrancode;
    }

    public void setLastUpdTrancode(String lastUpdTrancode) {
        this.lastUpdTrancode = lastUpdTrancode;
    }
}
